#!/bin/sh

SIGNAL=${SIGNAL:-TERM}
PIDS=$(ps ax | grep -i 'framework-spring-boot-1.0-SNAPSHOT.jar' | grep java | grep -v grep | awk '{print $1}')

echo "execute kill -s $SIGNAL $PIDS"

if [ -z "$PIDS" ]; then
    echo "No spring-boot-shutdown server to stop"
        exit 1
    else
        kill -s $SIGNAL $PIDS
fi
